/**
 * 
 */
package com.hs.job.task;

import com.hs.core.db.DBOperator;
import com.hs.core.db.DatabaseConnection;
import com.hs.pre.model.JobEntry;

/**
 * @author shl
 *
 */
public abstract class TaskFunction {
   private JobEntry job = null;
   public JobEntry getJob() {
	return job;
   }
	public void setJob(JobEntry job) {
		this.job = job;
	}
	public abstract void execute(); 
	/**
	 * 获得数据库操作类
	 * @return
	 */
	protected DBOperator getDBOperator(){
		try { 
			DBOperator dbo = DatabaseConnection.getDBOperator();
			return dbo;
		} catch (Exception e) { 
			e.printStackTrace();
		}
		return null;
	}
	
}
